{
	template:`
	<a-row>
	    <a-col :span="8">
            <a-page-header title="数据字典">
                <template #extra>
                    <a-button type="primary" @click="toEdit('');">添加</a-button>
                </template>
                <div ref="typeDiv" style="overflow-y:auto;overflow-x:hidden;">
                    <div v-for="item in list" style="padding:8px 0;">
                        <a-row type="flex" justify="end">
                            <a-col flex="auto">
                                <a-tag color="processing">{{item.type}}</a-tag>
								<a-typography-text v-if="model.oid==item.oid" strong>{{item.name}}</a-typography-text>
								<a-typography-link v-else @click="selectDict(item)">{{item.name}}</a-typography-link>
                            </a-col>
                            <a-col>
                                <a-space>
									<a-button type="text" size="small" @click="toEdit(item.oid)"><m-icon name="icon-icon-177"></m-icon></a-button>
                                </a-space>
                            </a-col>
                        </a-row>
                    </div>
                </div>
            </a-page-header>
	    </a-col>
	    <a-col :span="16">
	        <div id="dictData_list"></div>
	    </a-col>
	</a-row>
	`,
	props: ['localeZh','param','parentVue'],
	data:function(){
		return {
		    list:[],
			model:{},
		};
	},
	mounted(){
		this.loadList();
		this.pageFocus();
	},
	methods:{
        pageFocus:function(){
            this.$nextTick(function(){
                let el=this.$.refs['typeDiv'];
                if(el){
                    let h=window.innerHeight-this.gap4Top(el)-32;
                    el.style.maxHeight=h+"px";
                }
            }.bind(this));
        },
	    loadList:function(oid){
			this.requestData('action/manage/dictionaryType/getList',
				{},
				data=>{
					if(!data.code){
						this.list=data.list;
						let obj=this.model;
						if(!this.model.oid) obj=this.list[0];
						if(oid){
                            for(let i=0;i<this.list.length;i++){
                                if(oid==this.list[i].oid){
                                    obj=this.list[i];
                                    break;
                                }
                            }
						}
                        if(this.list.length)
                            this.selectDict(obj);
					}
				}
			);
	    },
	    selectDict:function(dict){
	        this.model=dict;
            this.loadPage("dictData_list",
                "action/manage/dictionaryData/dictionayDataList",
                {params:{'dictionaryType.oid':dict.oid,'parentData.name':dict.name,'parentData.value':dict.type}},
                function(pv,v3){

                }.bind(this)
            );
	    },
	    toEdit:function(oid){
		    this.openPage("action/manage/dictionaryType/toEdit",{model:{oid:oid}},function(flag,obj){
		        if(flag){
		            this.loadList(obj.oid);
		        }
		    }.bind(this),"500px");
	    }
	}
}